package com.moore.dto;

public class ResponseData {
    private int code;  //状态码 ： 业务的处理结果状态   ： 自己定义 0:登录成功   -1:登录/查询/注册/添加失败     200成功   500错误
    private String message;  //描述
    private Object data;     //数据    对象或ArrayList
    private int total;//分页的总行数

    public ResponseData() {
    }

    public ResponseData(int code, String message, Object data, int total) {
        this.code = code;
        this.message = message;
        this.data = data;
        this.total = total;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return "ResponseData{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                ", total=" + total +
                '}';
    }
}
